﻿<%@ Page Language="C#" MasterPageFile="~/Org/MasterPage.master" EnableEventValidation="false"
    AutoEventWireup="true" CodeFile="frmO_TraineeList.aspx.cs" Inherits="Org_frmO_TraineeList"
    Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script src="../js/jquery.min.js" type="text/javascript"></script>

    <script src="../js/jquery.blockUI.js" type="text/javascript"></script>
    <script src="../js/Validation.js" type="text/javascript"></script>
    
    <script type="text/javascript">
        $(document).ready(function() {
        disableControlOnLoadUpdatePanel("<%= up.ClientID %>", "<%= ddl_Type.ClientID %>,<%= ddl_Group.ClientID %>,<%= ddl_Company.ClientID %>,<%= ddl_SubCom.ClientID %>");
            registerEnterEvent("enter", "<%= btn_Search.ClientID %>", 5);
    })
    </script>
    <div class="maindiv1">
    <asp:UpdatePanel ID="up" runat="server">
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="btn_Search" />
                </Triggers>
                <ContentTemplate>
        <div class="Header3" style="padding-left: 30px">
            ※検索条件を指定してください。
        </div>
        <div style="margin-left: 30px;">
            <asp:Label ID="lbl_生年月日" runat="server" Text="在籍/帰国" Width="123pt"></asp:Label>&nbsp;
            <asp:Label ID="lbl_入国年月日" runat="server" Text="入国グループ" Width="123pt"></asp:Label>&nbsp;
            <asp:Label ID="Label5" runat="server" Text="技能実習実施機関" Width="123pt"></asp:Label>&nbsp;
            <asp:Label ID="lbl_送出し機関名" runat="server" Text="拠点機関" Width="123pt"></asp:Label>
        </div>
        <div style="margin-left: 30px; margin-bottom: 10px;">
            <asp:DropDownList ID="ddl_Type" runat="server"
                CssClass="dropdownlist width2 enter" AutoPostBack="True" 
                onselectedindexchanged="ddl_Type_SelectedIndexChanged">
            </asp:DropDownList>
            <script language="javascript">$("#<%=ddl_Type.ClientID %>").focus()</script>
            
            <asp:DropDownList ID="ddl_Group" runat="server"
                CssClass="dropdownlist width2 enter" AutoPostBack="True" 
                onselectedindexchanged="ddl_Group_SelectedIndexChanged">
            </asp:DropDownList>
            <asp:DropDownList ID="ddl_Company" DataTextField="企業名" DataValueField="企業ID" runat="server"
                 CssClass="dropdownlist width2 enter" AutoPostBack="True" 
                onselectedindexchanged="ddl_Company_SelectedIndexChanged">
            </asp:DropDownList>
            <asp:DropDownList ID="ddl_SubCom" runat="server"
                CssClass="dropdownlist width2 enter" 
                onselectedindexchanged="ddl_SubCom_SelectedIndexChanged" 
                AutoPostBack="True">
            </asp:DropDownList>

        </div>
         <div style="margin-left: 30px;margin-top:5px;">
        <asp:Label ID="Label9" runat="server" Text="AND検索"></asp:Label></div>
        <div class="Header3" style="padding-left: 30px; margin-bottom: 10px;padding-top:0px;">
        
            <asp:TextBox ID="txt_Search" runat="server" CssClass="enter textbox width2" Font-Names="MS UI Gothic"></asp:TextBox>
            <asp:Label ID="Label8" runat="server" Text="※氏名・性別・国籍・日付などキーワードを自由に入力可能" ForeColor="Red"></asp:Label>
        </div>
        <div style="margin-left: 100px;">
            <asp:Button ID="btn_Search" runat="server" Text="検索" CssClass="btn"
                OnClick="btn_Search_Click" />
        </div>
        <div class="Header3" style="padding-left: 100px; margin-bottom: 10px;">
            <span>例：”2”を入力した場合 → データの中に”2”が存在する実習生を表示する。
                <br />
                ”＊A”を入力した場合 → データの中で最後に”A”がある実習生を表示する。 </span>
        </div>
        <div class="Header4">
        </div>
        <asp:HiddenField ID="hd_pageCount" runat="server"></asp:HiddenField>
        <div style="margin: 10px 45px 50px 30px" class="detail-admin-row">
            <div id="div_lbl" runat="server" class="Header3" style="padding-left: 0px">
                <asp:Label ID="Label11" runat="server" Text="※氏名をクリックすると、個人の詳細情報を確認できます。"></asp:Label>
            </div>
            <br />
            <asp:Panel ID="Panel1" runat="server" Width="710px" ScrollBars="Auto" >
            
                        <asp:GridView ID="grv_human" runat="server" AutoGenerateColumns="False" 
                            CssClass="mGrid" PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt" 
                            AllowPaging="True" onpageindexchanging="grv_human_PageIndexChanging">
                            <Columns>
                                <asp:TemplateField HeaderText="氏名" SortExpression="氏名" HeaderStyle-Width="180px">
                                    <ItemTemplate>
                                        <%--<asp:LinkButton id="HyperLink1" runat="server"  CommandName="view" Text='<%# Bind("氏名3") %>' PostBackUrl="~/Org/frmO_TraineeBasicInfo.aspx" ></asp:LinkButton> --%>
                                        <asp:LinkButton ID="HyperLink1" runat="server" CommandName="view" Text='<%# Bind("氏名3") %>'
                                            PostBackUrl='<%# "~/Org/frmO_TraineeBasicInfo.aspx?id="+ Eval("社員ID") %>'></asp:LinkButton>
                                    </ItemTemplate>
                                    <FooterTemplate>
                                    </FooterTemplate>
                                    <FooterStyle HorizontalAlign="Center" VerticalAlign="Middle" BorderWidth="1px" BorderStyle="Solid"
                                        BorderColor="Black" BackColor="Gray"></FooterStyle>
                                    <HeaderStyle Width="180px" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="性別" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <%# this.get性別(Eval("性別")) %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="生年月日" HeaderStyle-Width="110px">
                                    <ItemTemplate>
                                        <%# Eval("生年月日","{0:yyyy年MM月dd日}")%>
                                    </ItemTemplate>
                                    <HeaderStyle Width="110px" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="国籍">
                                    <ItemTemplate>
                                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("国籍名") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="入国年月日" HeaderStyle-Width="110px">
                                    <ItemTemplate>
                                        <%# Eval("入国年月日", "{0:yyyy年MM月dd日}") %>
                                    </ItemTemplate>
                                    <HeaderStyle Width="110px" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="2号移行年月日" HeaderStyle-Width="110px">
                                    <ItemTemplate>
                                        <%# this.get2号移行年月日(Eval("入国年月日"))%>
                                    </ItemTemplate>
                                    <HeaderStyle Width="110px" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="送出し機関名">
                                    <ItemTemplate>
                                        <asp:Label ID="Label5" runat="server" Text='<%# Bind("企業名") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle Width="110px" />
                                </asp:TemplateField>
                            </Columns>
                            <PagerStyle CssClass="pgr" />
                            <AlternatingRowStyle CssClass="alt" />
                        </asp:GridView>
                </asp:Panel>
        </div>
        </ContentTemplate>
            </asp:UpdatePanel>
    </div>
</asp:Content>
